<script>
import outMain from "@/components/outMain.vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { PositionDetail } from "@/http/api";
export default {
  components: { outMain },
  name: "",
  data() {
    return {
      detailId: this.$route.query.id,
      formData: {},
    };
  },
  props: {},
  setup() {},
  methods: {
    linkFn(url, id, navId) {
      if (id != 0) {
        this.$router.push({ path: url, query: { id: id, navId: navId } });
      }
    },
    backFn() {
      this.$router.back();
    },
    getData() {
      PositionDetail({ enterprise_position_id: this.detailId }).then((res) => {
        if (res.data.code == 1) {
          this.formData = res.data.data;
        }
      });
    },
  },
  mounted() {},
  created() {
    this.getData();
  },
};
</script>
<template>
  <outMain>
    <div class="formCont">
      <div class="formStep">
        <div class="formHead">
          <div>岗位详情</div>
          <btn value="返回上一级" @ok="backFn"></btn>
        </div>
        <div class="formMain">
          <div class="stepCont">
            <div class="formDes">
              <div class="desTitle">基本信息</div>
              <div class="desCont">
                <div class="desItem">
                  <div class="desName">岗位职务</div>
                  <div class="desText">{{ formData.position_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">岗位类型</div>
                  <div class="desText">
                    <el-tag type="danger" v-if="formData.position_type == 1"
                      >急聘岗位</el-tag
                    >
                    <el-tag v-if="formData.position_type == 2">普通岗位</el-tag>
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">发布来源</div>
                  <div class="desText">
                    <el-tag
                      type="success"
                      v-if="formData.position_create_type == 1"
                      >企业发布</el-tag
                    >
                    <el-tag
                      type="info"
                      v-if="formData.position_create_type == 2"
                      >管理员发布</el-tag
                    >
                    <el-tag v-if="formData.position_create_type == 3"
                      >小程序发布</el-tag
                    >
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">岗位月薪</div>
                  <div class="desText">
                    <div v-if="formData.start_monry == '0'">面议</div>
                    <div v-else>
                      {{ formData.start_monry }}~{{ formData.end_monry }}({{
                        formData.unit == 1 ? "元" : "美元"
                      }})
                    </div>
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">招聘人数</div>
                  <div class="desText">{{ formData.zprs }}(人)</div>
                </div>
                <div class="desItem">
                  <div class="desName">岗位状态</div>
                  <div class="desText">
                    <el-tag type="success" v-if="formData.position_status == 1"
                      >招聘中</el-tag
                    >
                    <el-tag type="info" v-if="formData.position_status == 2"
                      >已关闭</el-tag
                    >
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">换员港口</div>
                  <div class="desText">{{ formData.hygk || "- -" }}</div>
                </div>

                <div class="desItem">
                  <div class="desName">证书要求</div>
                  <div class="desText">{{ formData.zsdj }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">名企背景</div>
                  <div class="desText">
                    <span v-if="formData.mqbj == 1">国企</span>
                    <span v-if="formData.mqbj == 2">知名企业</span>
                    <span v-if="formData.mqbj == 3">不限</span>
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">学历要求</div>
                  <div class="desText">{{ formData.xlyq || "- -" }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">国籍要求</div>
                  <div class="desText">{{ formData.gjyq || "- -" }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">语言能力</div>
                  <div class="desText">{{ formData.yynl || "- -" }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">年龄要求</div>
                  <div class="desText">{{ formData.nlyq || "- -" }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">工作经验</div>
                  <div class="desText">{{ formData.gzjy || "- -" }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">职位描述</div>
                  <div class="desText">{{ formData.gwms || "- -" }}</div>
                </div>

                <div class="desItem">
                  <div class="desName">发布企业</div>
                  <div class="desText">
                    <span
                      class="linkText_"
                      @click="
                        linkFn('/accountCompanyDetail', formData.enterprise_id)
                      "
                    >
                      {{ formData.enterprise_name }}
                    </span>
                  </div>
                </div>
                <div class="desItem" v-if="formData.position_create_type != 1">
                  <div class="desName">联系电话</div>
                  <div class="desText">
                    {{ formData.position_contact_mobile }}
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">发布时间</div>
                  <div class="desText">{{ formData.create_time }}</div>
                </div>
              </div>
            </div>
            <div class="formDes">
              <div class="desTitle">船舶信息</div>
              <div class="desCont">
                <div class="desItem">
                  <div class="desName">船舶名称</div>
                  <div class="desText">{{ formData.watercraft_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">船舶类型</div>
                  <div class="desText">{{ formData.watercraft_type }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">船旗</div>
                  <div class="desText">{{ formData.watercraft_colors }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">呼号</div>
                  <div class="desText">{{ formData.watercraft_hh }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">imo</div>
                  <div class="desText">{{ formData.watercraft_imo }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">船舶载货量</div>
                  <div class="desText">
                    {{ formData.watercraft_num }}{{ formData.watercraft_dw }}
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">船舶航区</div>
                  <div class="desText">{{ formData.watercraft_area }}</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </outMain>
</template>
<style scoped lang="less"></style>
